<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="com.yayan.beautyclub.bean.Admin"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <title>登陆</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link type="text/css" href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,800italic,400,700,800">
    <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Oswald:400,700,300">
    <link type="text/css" rel="stylesheet" href="styles/font-awesome.min.css">
    <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css">
    <link type="text/css" rel="stylesheet" href="styles/animate.css">
    <link type="text/css" rel="stylesheet" href="styles/all.css">
    <link type="text/css" rel="stylesheet" href="styles/main.css">
    <link type="text/css" rel="stylesheet" href="styles/style-responsive.css">
</head>
<body style="background: url('images/bg/bg.png') center center fixed;height:50%">
    <div class="page-form">
        <div class="panel panel-blue">
            <div class="panel-body pan">
                <form action="admin/login" class="form-horizontal" method="post" id="login-Form">
                <div class="form-body pal">
                    <div class="col-md-12 text-center">
                        <h1 style="margin-top: -90px; font-size: 48px;"></h1>
                        <br />
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            <img src="images/avatar/profile-pic.png" class="img-responsive" style="margin-top: -40px;" />
                        </div>
                        <div class="col-md-9 text-center">
                            <h1>管理员登陆 </h1>
                            <br />
                            <p style="color:red">${sessionScope.admin.remarks }</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputName" class="col-md-3 control-label">
                            用户名:</label>
                        <div class="col-md-9">
                            <div class="input-icon right">
                                <i class="fa fa-user"></i>
                                <input id="inputName" type="text" value="${sessionScope.admin.aName}" placeholder="请输入用户名" name="userName" class="form-control" />
							</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="inputPassword" class="col-md-3 control-label">
                            密&nbsp;码:</label>
                        <div class="col-md-9">
                            <div class="input-icon right">
                                <i class="fa fa-lock"></i>
                                <input id="inputPassword" type="password" value="${sessionScope.admin.aPwd}" placeholder="请输入密码" name="password" class="form-control" /></div>
                        </div>
                    </div>
                    <div class="form-group mbn">
                        <div class="col-lg-12" align="right">
                            <div class="form-group mbn">
                                <div class="col-lg-3">
                                    &nbsp;
                                </div>
                                <div class="col-lg-9">                                    
                                    <button type="reset" class="btn btn-default">重&nbsp;置</button>&nbsp;&nbsp;
                                    <button type="submit" id="submit-btn" class="btn btn-default">登&nbsp;陆</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                </form>
            </div>
        </div>
        <div class="col-lg-12 text-center">
            <p><a href="">忘记密码？</a></p>
        </div>
    </div>
<script src="script/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="script/layer/layer.js"></script>
<script type="text/javascript">
  $(function () {
    $("#submit-btn").click(function () {
      var userName = $("#inputName").val();
      var password = $("#inputPassword").val();
      if(userName == null || userName == ""){
    	  layer.alert("请输入用户名",{icon:0});
    	  return false;
      }
      if(password == null || password == ""){
    	  layer.alert("请输入密码",{icon:0});
    	  return false;
      }
    });
  })
</script>
<%
Admin admin = (Admin)session.getAttribute("admin");
if(admin != null && admin.getStatus() == 0)
	session.setAttribute("admin",null);
%>
</body>
</html>
